package MAP_study;

import java.util.*;
//程序作用：统计输入的字符串所包含的字符及其个数

public class MAP_homework2 {
    public static void main(String[] args) {
        String str = new Scanner(System.in).next();
        char[] ch = str.toCharArray();
        Map<Character,Integer> map = new HashMap<>();
        for (int i = 0; i < ch.length; i++) {
            if(map.containsKey(ch[i]))
            {
                map.put(ch[i],map.get(ch[i])+1);
            }
            else
            {
                map.put(ch[i],1);
            }
        }

        Iterator<Character> it = map.keySet().iterator();
        while(it.hasNext())
        {
            char c = it.next();
            System.out.println(c+"-->"+map.get(c));
        }
    }
}
